<template>
  <div id="app" class="xxx">
    <h1>我是app.vue</h1>
    <button @click="show = false">销毁mybox</button>

    <!-- 
      v-if：相当于是创建和销毁
     -->
    <my-box v-if="show"/>
  </div>
</template>

<script>
import MyBox from './components/MyBox.vue'
  export default {
    components: {
      MyBox
    },
    data() {
      return {
        show: true
      }
    },
  }
</script>

<style>

</style>